package com.cskaoyan.controller.user;

import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.vo.DashboardVo;
import com.cskaoyan.service.user.DashboardService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jzp
 * @since 2022/11/19 16:41
 */
@RestController

public class DashboardController {

    @Autowired
    DashboardService dashboardService;
@RequiresPermissions("admin:category:read")
    @RequestMapping("admin/dashboard")
    public BaseRespVo dashboard() {
        DashboardVo dashboardVo = dashboardService.countNum();
        return BaseRespVo.succeed(dashboardVo);
    }
}
